! name: b.ajt02*
! type: ArchiCAD Door File
! ***** 3D script *****

mat1 = c
mat2 = d
tsz = e


addz -0.02
addz 0.0125
resol 120

prism_ 10, 0.045,
    -a/2+tsz+0.13, 0.31, 15,
     a/2-tsz-0.13, 0.31, 15,
     a/2-tsz-0.13, 0.81, 15,
    -a/2+tsz+0.13, 0.81, 15,
    -a/2+tsz+0.13, 0.31, -1,

    -a/2+tsz+0.165, 0.345, 15,
     a/2-tsz-0.165, 0.345, 15,
     a/2-tsz-0.165, 0.775, 15,
    -a/2+tsz+0.165, 0.775, 15,
    -a/2+tsz+0.165, 0.345, -1

del 1

prism_ 5, 0.07,
    -a/2+tsz+0.165, 0.345, 15,
     a/2-tsz-0.165, 0.345, 15,
     a/2-tsz-0.165, 0.775, 15,
    -a/2+tsz+0.165, 0.775, 15,
    -a/2+tsz+0.165, 0.345, -1

kx = -a/2+tsz+0.13
ky = 0.96

dx = (a-tsz*2-0.13*2-0.03) / 2
dy = (b-0.96-0.16-0.03) / 2


for iy = 1 to 2 step 1

    for ix = 1 to 2 step 1

        put kx, ky, 15,
            kx+dx, ky, 15,
            kx+dx, ky+dy, 15,
            kx, ky+dy, 15,
            kx, ky, -1

        kx = kx+dx+0.03

    next ix

    kx = -a/2+tsz+0.13

    ky = ky+dy+0.03

next iy

prism_ 10+nsp/3, 0.07,
    -a/2+tsz-0.03, 0.01, 15,
     a/2-tsz+0.03, 0.01, 15,
     a/2-tsz+0.03, b-tsz+0.03, 15,
    -a/2+tsz-0.03, b-tsz+0.03, 15,
    -a/2+tsz-0.03, 0.01, -1,

    -a/2+tsz+0.13, 0.31, 15,
     a/2-tsz-0.13, 0.31, 15,
     a/2-tsz-0.13, 0.81, 15,
    -a/2+tsz+0.13, 0.81, 15,
    -a/2+tsz+0.13, 0.31, -1,
   

    use (nsp)

addz 0.07
addx a/2-tsz
addy 0.01
roty -90
rotz 90
 
prism_   5, a-2*tsz, 
      0, 0, 15,
      0.07, 0, 15,
      0.07, -0.005, 15,
      0.05, -0.025, 15,
      0, -0.025, 15

del 5
material mat1
addz 0.063/2

for ii = 1 to 2*2 step 1

    prism_ 5, 0.007,
        get (15)

next ii

del 1
addy 1.015
addx -a/2+tsz+0.13/2
addz 0.07

call "handle_3" mat2

addz -0.07
mulz -1

call "handle_4" mat2
